package com.tech.impl;

import com.tech.UserDao;
import com.tech.domain.User;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Properties;

@Repository("userDao")
@Scope("singleton")
public class UserDaoImpl implements UserDao {


    private String userName;
    private int age;

    private List<String> strList;

    private Map<String, User> userMap;
    private Properties properties;

    public void setStrList(List<String> strList) {
        this.strList = strList;
    }

    public void setUserMap(Map<String, User> userMap) {
        this.userMap = userMap;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public UserDaoImpl(){
        System.out.println("UserDaoImpl 创建了");
    }

    public void init(){
        System.out.println("初始化方法");
    }

    public void destory(){
        System.out.println("销毁方法");
    }
    public void save() {
//        System.out.println("save 数据" +userName+"===="+age);

        System.out.println(strList);
        System.out.println(userMap);
        System.out.println(properties);
    }
}
